package com.shipwe.loans.device.http

import com.shipwe.loans.device.DeviceShipweSycBuilder


object DeviceShipweUrlHelper {

    fun combineUrl(): String {
        if (DeviceShipweSycBuilder.host.isBlank() or DeviceShipweSycBuilder.zone.isBlank() or DeviceShipweSycBuilder.pathCommon.isBlank()) {
            return ""
        }

        val zone = DeviceShipweSycBuilder.zone
        DeviceShipweSycBuilder.zone = zone.replace("/", "")

        val pathCommon = DeviceShipweSycBuilder.pathCommon
        DeviceShipweSycBuilder.pathCommon = pathCommon.replace("/", "")

        return DeviceShipweSycBuilder.host + "/" + DeviceShipweSycBuilder.zone + "/" + DeviceShipweSycBuilder.pathCommon
    }
}